<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vue示例</title>
<script src="https://cdn.bootcdn.net/ajax/libs/vue/3.2.40/vue.global.js"></script>
</head>
<body>
<div id="app">
    {{name}} <br>
    {{person}} <br>
    {{personInfo('tom')}}
</div>
<script>
const app = Vue.createApp({
data() {
return{
    name:'张三',
    age:20,
    height:180,
    country:'china'
}
},
methods: {
},
computed: {
    person:{
        get(){
            console.log('getter');
            return 'height:'+this.height+'age:'+this.age+'country:'+this.country
        },
        set(){
            console.log('setter');
this.height=165;
this.name='jack';
this.country='USA'
        }
    },
    personInfo(a){
        console.log(a);
return (params) => {
    console.log(params);
    return this.name+params
}
    }
},
watch: {
}
})
const vm=app.mount("#app");
</script>
</body>
</html>